
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>2-7 结构体数组渲染 · Beego微服务基础实战笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="雪山凌狐">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-material-light.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-donate/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-auto-scroll-table/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-lightbox/css/lightbox.min.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-ad/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-flexible-alerts/style.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../css/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../Summary.html" />
    
    
    <link rel="prev" href="2-6 结构体数组详解.html" />
    

    
        <link rel="shortcut icon" href='../assets/favicon.ico' type="image/x-icon">
    
    
        <link rel="bookmark" href='../assets/favicon.ico' type="image/x-icon">
    
    
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.xueshanlinghu.com" target="_blank" class="custom-link">雪山凌狐教程</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Beego 微服务基础实战笔记介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Catalog.html">
            
                <a href="../Catalog.html">
            
                    
                    课程目录
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../chapter1/">
            
                <a href="../chapter1/">
            
                    
                    一、Beego 前奏
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../chapter1/1-1 环境安装.html">
            
                <a href="../chapter1/1-1 环境安装.html">
            
                    
                    1-1 环境安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../chapter1/1-2 我的第一个beego项目.html">
            
                <a href="../chapter1/1-2 我的第一个beego项目.html">
            
                    
                    1-2 我的第一个beego项目
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../chapter1/1-3 第一个beego项目剖析.html">
            
                <a href="../chapter1/1-3 第一个beego项目剖析.html">
            
                    
                    1-3 第一个beego项目剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../chapter1/1-4 controller运行原理.html">
            
                <a href="../chapter1/1-4 controller运行原理.html">
            
                    
                    1-4 controller运行原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../chapter1/1-5 第一个controller.html">
            
                <a href="../chapter1/1-5 第一个controller.html">
            
                    
                    1-5 第一个controller
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    二、Beego 前后端数据交互
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="2-1 模板渲染介绍.html">
            
                <a href="2-1 模板渲染介绍.html">
            
                    
                    2-1 模板渲染介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="2-2 结构体详解.html">
            
                <a href="2-2 结构体详解.html">
            
                    
                    2-2 结构体详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="2-3 结构体渲染.html">
            
                <a href="2-3 结构体渲染.html">
            
                    
                    2-3 结构体渲染
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="2-4 数组详解.html">
            
                <a href="2-4 数组详解.html">
            
                    
                    2-4 数组详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="2-5 数组渲染.html">
            
                <a href="2-5 数组渲染.html">
            
                    
                    2-5 数组渲染
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="2-6 结构体数组详解.html">
            
                <a href="2-6 结构体数组详解.html">
            
                    
                    2-6 结构体数组详解
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.7" data-path="2-7 结构体数组渲染.html">
            
                <a href="2-7 结构体数组渲染.html">
            
                    
                    2-7 结构体数组渲染
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Summary.html">
            
                <a href="../Summary.html">
            
                    
                    课程总结
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >2-7 结构体数组渲染</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;"><b></b>&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;</a></li><ul><ul><li><span class="title-icon fa fa-hand-o-right"></span><a href="#&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;"><b></b>&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;</a></li></ul></ul></ul></div><h1 id="&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;"><a name="&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;" class="anchor-navigation-ex-anchor" href="#&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;</h1>
<h3 id="&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;"><a name="&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;" class="anchor-navigation-ex-anchor" href="#&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x5230;&#x524D;&#x7AEF;</h3>
<p><code>./controllers/default.go</code></p>
<p>&#x6DFB;&#x52A0;&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x90E8;&#x5206;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x6CE8;&#x610F;&#xFF0C;&#x8FD9;&#x91CC;&#x6570;&#x7EC4;&#x5B9A;&#x4E49;&#x6570;&#x91CF;&#x4E3A; 3 &#x4F46;&#x6211;&#x4EEC;&#x521D;&#x59CB;&#x5316;&#x5B9A;&#x4E49;&#x7684;&#x7ED3;&#x6784;&#x4F53;&#x5185;&#x5BB9;&#x53EA;&#x6709;&#x4E24;&#x4E2A;&#xFF0C;&#x90A3;&#x6700;&#x540E;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x5C31;&#x662F;&#x81EA;&#x52A8;&#x4E3A; 0 &#x7684;&#x3002;</p>
<pre class="language-"><code class="lang-go"><span class="token keyword">package</span> controllers

<span class="token keyword">import</span> <span class="token punctuation">(</span>
    beego <span class="token string">&quot;github.com/beego/beego/v2/server/web&quot;</span>
<span class="token punctuation">)</span>

<span class="token comment">// &#x6DFB;&#x52A0;&#x7684;&#x7ED3;&#x6784;&#x4F53;</span>
<span class="token keyword">type</span> UserStruct <span class="token keyword">struct</span> <span class="token punctuation">{</span>
    Id       <span class="token builtin">int</span>
    UserName <span class="token builtin">string</span>
    Age      <span class="token builtin">int</span>
<span class="token punctuation">}</span>

<span class="token keyword">type</span> MainController <span class="token keyword">struct</span> <span class="token punctuation">{</span>
    beego<span class="token punctuation">.</span>Controller
<span class="token punctuation">}</span>

<span class="token keyword">type</span> UserController <span class="token keyword">struct</span> <span class="token punctuation">{</span>
    beego<span class="token punctuation">.</span>Controller
<span class="token punctuation">}</span>

<span class="token keyword">func</span> <span class="token punctuation">(</span>u <span class="token operator">*</span>UserController<span class="token punctuation">)</span> <span class="token function">Get</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token comment">//u.Data[&quot;Username&quot;] = &quot;&#x96EA;&#x5C71;&#x51CC;&#x72D0;&quot;</span>
    <span class="token comment">//u.Data[&quot;Age&quot;] = 18</span>

    <span class="token comment">// &#x4E5F;&#x53EF;&#x4EE5;&#x6309;&#x987A;&#x5E8F;&#x8D4B;&#x503C;&#xFF0C;&#x4E0D;&#x7528;&#x52A0;&#x5C5E;&#x6027;&#x540D;&#xFF0C;&#x4F46;&#x4E0D;&#x63A8;&#x8350;</span>
    user <span class="token operator">:=</span> UserStruct<span class="token punctuation">{</span>Id<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span> UserName<span class="token punctuation">:</span> <span class="token string">&quot;xueshanlinghu&quot;</span><span class="token punctuation">,</span> Age<span class="token punctuation">:</span> <span class="token number">18</span><span class="token punctuation">}</span>
    <span class="token comment">// &#x5B9A;&#x4E49;&#x6A21;&#x677F;&#x4E2D;&#x7684;&#x5BF9;&#x8C61;&#x5C5E;&#x6027;</span>
    u<span class="token punctuation">.</span>Data<span class="token punctuation">[</span><span class="token string">&quot;user&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> user

    arrs <span class="token operator">:=</span> <span class="token punctuation">[</span><span class="token number">5</span><span class="token punctuation">]</span><span class="token builtin">int</span><span class="token punctuation">{</span><span class="token number">9</span><span class="token punctuation">,</span> <span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">,</span> <span class="token number">6</span><span class="token punctuation">,</span> <span class="token number">5</span><span class="token punctuation">}</span>
    u<span class="token punctuation">.</span>Data<span class="token punctuation">[</span><span class="token string">&quot;arrs&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> arrs

    <span class="token comment">// &#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;</span>
    arrStruct <span class="token operator">:=</span> <span class="token punctuation">[</span><span class="token number">3</span><span class="token punctuation">]</span>UserStruct<span class="token punctuation">{</span><span class="token punctuation">{</span>Id<span class="token punctuation">:</span> <span class="token number">1</span><span class="token punctuation">,</span> UserName<span class="token punctuation">:</span> <span class="token string">&quot;xueshanlinghu&quot;</span><span class="token punctuation">,</span> Age<span class="token punctuation">:</span> <span class="token number">18</span><span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span>Id<span class="token punctuation">:</span> <span class="token number">2</span><span class="token punctuation">,</span> UserName<span class="token punctuation">:</span> <span class="token string">&quot;&#x96EA;&#x5C71;&#x51CC;&#x72D0;&quot;</span><span class="token punctuation">,</span> Age<span class="token punctuation">:</span> <span class="token number">19</span><span class="token punctuation">}</span><span class="token punctuation">}</span>
    u<span class="token punctuation">.</span>Data<span class="token punctuation">[</span><span class="token string">&quot;arrStruct&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> arrStruct

    u<span class="token punctuation">.</span>TplName <span class="token operator">=</span> <span class="token string">&quot;user.html&quot;</span>
<span class="token punctuation">}</span>

<span class="token keyword">func</span> <span class="token punctuation">(</span>c <span class="token operator">*</span>MainController<span class="token punctuation">)</span> <span class="token function">Get</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    c<span class="token punctuation">.</span>Data<span class="token punctuation">[</span><span class="token string">&quot;Website&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token string">&quot;beego.me&quot;</span>
    c<span class="token punctuation">.</span>Data<span class="token punctuation">[</span><span class="token string">&quot;Email&quot;</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token string">&quot;astaxie@gmail.com&quot;</span>
    c<span class="token punctuation">.</span>TplName <span class="token operator">=</span> <span class="token string">&quot;index.tpl&quot;</span>
<span class="token punctuation">}</span>
</code></pre>
<p>&#x540C;&#x6837;&#x7684;&#xFF0C;&#x6211;&#x4EEC;&#x5728; <code>./views/test.html</code> &#x6DFB;&#x52A0;&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x5728;&#x7ED3;&#x5C3E;&#xFF1A;</p>
<blockquote>
<p>[!danger]</p>
<p>&#x6CE8;&#x610F;&#x6211;&#x4EEC;&#x6A21;&#x677F;&#x6587;&#x4EF6;&#x4E2D;&#x6CE8;&#x91CA;&#x5185;&#x5BB9;&#x7684;&#x5199;&#x6CD5;&#xFF0C;&#x90A3;&#x6837;&#x5199;&#x5C31;&#x4E0D;&#x4F1A;&#x6700;&#x7EC8;&#x6E32;&#x67D3;&#x5230; html &#x9875;&#x9762;&#x5F53;&#x4E2D;&#x3002;</p>
</blockquote>
<pre class="language-"><code class="lang-html">{{/*&#x8981;&#x6CE8;&#x91CA;&#x7684;&#x5185;&#x5BB9;*/}}
</code></pre>
<pre class="language-"><code class="lang-html"><span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">DOCTYPE</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>en<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>UTF-8<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Title<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>body</span><span class="token punctuation">&gt;</span></span>


&#x7528;&#x6237;&#x9875;&#x9762;
id: {{.user.Id}}
&#x7528;&#x6237;&#x540D;&#xFF1A;{{.user.UserName}}
&#x5E74;&#x9F84;&#xFF1A;{{.user.Age}}

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>
==============================<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>

{{range .arrs}}
    {{.}}
{{end}}

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>

{{range $i, $v := .arrs}}
    {{$i}}
    {{$v}}
{{end}}

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>

{{/*&#x7ED3;&#x6784;&#x4F53;&#x6570;&#x7EC4;&#x6E32;&#x67D3;&#xFF0C;&#x7B2C;&#x4E00;&#x79CD;&#x65B9;&#x5F0F;*/}}
{{range .arrStruct}}
{{/*    {{.Id}}*/}}
    {{.UserName}}
{{/*    {{.Age}}*/}}
{{end}}

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>

{{/*&#x7B2C;&#x4E8C;&#x79CD;&#x65B9;&#x5F0F;&#xFF0C;&#x4E0D;&#x9700;&#x8981; $i &#x6216; _ &#x5360;&#x4F4D;&#x7B26;&#x4E5F;&#x53EF;&#x4EE5;*/}}
{{range $v := .arrStruct}}
    {{$v.Id}}
    {{$v.UserName}}
    {{$v.Age}}
{{end}}

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>body</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p>&#x6700;&#x7EC8;&#x8FD0;&#x884C;&#x7684;&#x5448;&#x73B0;&#x6548;&#x679C;&#xFF1A;</p>
<pre class="language-"><code class="lang-html">&#x7528;&#x6237;&#x9875;&#x9762; id: 1 &#x7528;&#x6237;&#x540D;&#xFF1A;xueshanlinghu &#x5E74;&#x9F84;&#xFF1A;18
==============================
9 8 7 6 5
0 9 1 8 2 7 3 6 4 5
xueshanlinghu &#x96EA;&#x5C71;&#x51CC;&#x72D0;
1 xueshanlinghu 18 2 &#x96EA;&#x5C71;&#x51CC;&#x72D0; 19 0 0
</code></pre>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; <a href="http://www.xueshanlinghu.com" target="_blank">&#x96EA;&#x5C71;&#x51CC;&#x72D0;&#x6559;&#x7A0B;</a> all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2022-06-06 23:13:08
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="2-6 结构体数组详解.html" class="navigation navigation-prev " aria-label="Previous page: 2-6 结构体数组详解">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../Summary.html" class="navigation navigation-next " aria-label="Next page: 课程总结">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"2-7 结构体数组渲染","level":"1.4.7","depth":2,"next":{"title":"课程总结","level":"1.5","depth":1,"path":"Summary.md","ref":"./Summary.md","articles":[]},"previous":{"title":"2-6 结构体数组详解","level":"1.4.6","depth":2,"path":"chapter2/2-6 结构体数组详解.md","ref":"./chapter2/2-6 结构体数组详解.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","-search","-lunr","-sharing","-livereload","-highlight","prism","prism-themes","fontsettings","back-to-top-button","expandable-chapters-small","code","search-pro","splitter","donate","tbfed-pagefooter","pageview-count","auto-scroll-table","lightbox","anchor-navigation-ex","sitemap-general","ad","autotheme","advanced-emoji","flexible-alerts","statistics","push-bd"],"styles":{"website":"/css/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy <a href='http://www.xueshanlinghu.com'>雪山凌狐教程</a>","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prism-themes/themes/prism-material-light.css"]},"ad":{"contentBottom":false},"statistics":{"bd_url":"https://hm.baidu.com/hm.js","cnzz_url":"https://s95.cnzz.com/z_stat.php","google_url":"https://www.googletagmanager.com/gtag/js","bd_token":""},"splitter":{},"search-pro":{},"auto-scroll-table":{},"code":{"copyButtons":true},"donate":{"alipay":"/beego-basic-notes/assets/alipay-code.jpg","alipayText":"支付宝打赏","button":"赏","title":"","wechat":"/beego-basic-notes/assets/wechatpay-code.jpg","wechatText":"微信打赏"},"sitemap-general":{"prefix":"http://doc.xueshanlinghu.com/beego-basic-notes/"},"fontsettings":{"family":"sans","size":2,"theme":"white"},"anchor-navigation-ex":{"showLevel":false,"associatedWithSummary":true,"mode":"float","showGoTop":false,"printLog":false,"multipleH1":true,"float":{"floatIcon":"fa fa-navicon","showLevelIcon":true,"level1Icon":"fa fa-hand-o-right","level2Icon":"fa fa-hand-o-right","level3Icon":"fa fa-hand-o-right"},"pageTop":{"showLevelIcon":false,"level1Icon":"","level2Icon":"","level3Icon":""}},"favicon":{"shortcut":"/assets/favicon.ico","bookmark":"/assets/favicon.ico"},"lightbox":{"jquery":true,"sameUuid":false},"push-bd":{},"back-to-top-button":{},"pageview-count":{},"prism-themes":{},"expandable-chapters-small":{},"flexible-alerts":{"style":"flat","note":{"label":"说明","icon":"fa fa-info-circle","className":"info"},"tip":{"label":"提示","icon":"fa fa-lightbulb-o","className":"tip"},"warning":{"label":"警告","icon":"fa fa-exclamation-triangle","className":"warning"},"danger":{"label":"注意","icon":"fa fa-ban","className":"danger"},"question":{"label":"问题","icon":"fa fa-question-circle","className":"question"}},"autotheme":{"white":[25,25,25,25,25,25,25,25],"sepia":[25,25,25,25,25,25],"night":[20,21,22,23,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},"advanced-emoji":{"embedEmojis":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"雪山凌狐","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"CATALOG_FOR_GITBOOK.md"},"variables":{},"title":"Beego微服务基础实战笔记","language":"zh-hans","links":{"sidebar":{"雪山凌狐教程":"http://www.xueshanlinghu.com"}},"gitbook":"3.2.3","description":"Beego微服务基础实战笔记，Beego入门从此开始"},"file":{"path":"chapter2/2-7 结构体数组渲染.md","mtime":"2022-06-06T15:13:08.951Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-06-06T15:13:14.701Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-donate/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-auto-scroll-table/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lightbox/js/lightbox.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-ad/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-autotheme/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-flexible-alerts/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-statistics/statistics.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-push-bd/plugin.js"></script>
        
    

    </body>
</html>

